# -*- coding : utf_8 -*-
"""
=======================================
Time : 2025/4/14 10:45
Author : 田霄汉
Email : 522989570@qq.com
File : combat_class19.py
Project : pandas_demo
Function : 打开csv,txt,tsv格式文件
=======================================
"""
import pandas as pd
from config.setting import file_path

csv19_path = file_path['csv_path']+'/combat19.csv'
tsv19_path = file_path['tsv_path']+'/combat19.tsv'
txt19_path = file_path['txt_path']+'/combat19.txt'

# # 第一种读取csv格式
# csv_Score = pd.read_csv(filepath_or_buffer=csv19_path, index_col='id')
# print(csv_Score)
# # 第二种读取tsv格式
# tsv_Score = pd.read_csv(filepath_or_buffer=tsv19_path, sep='\t', index_col='id')
# print(tsv_Score)
# 第三种读取txt格式
txt_Score = pd.read_csv(filepath_or_buffer=txt19_path, sep='|', index_col='id')
print(txt_Score)




# with open(file=csv19_path, mode='r', encoding='utf-8') as csv_file:
#     csv_content = csv_file.read()
#
# txt_content = csv_content.replace(',', '|')
#
# with open(file=txt19_path, mode='w', encoding='utf-8') as txt_file:
#     txt_file.write(txt_content)